package kr.or.javacafe.USCM.USCM102.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import kr.or.javacafe.USCM.USCM102.service.USCM102Service;
import kr.or.javacafe.USCM.USCM102.web.USCM102Controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

import kr.or.javacafe.common.dao.*;
import kr.or.javacafe.common.util.*;

import kr.or.javacafe.USCM.USCM102.dao.*;
import kr.or.javacafe.USCM.USCM102.service.*;
import kr.or.javacafe.USCM.USCM102.model.*;

public class USCM102Controller extends MultiActionController {

	protected final static Log logger = LogFactory.getLog(USCM102Controller.class);
	
	private USCM102Service uscm102Service;
	
	public void setUscm102Service(USCM102Service uscm102Service){
		this.uscm102Service = uscm102Service;
	}
	

	
	public ModelAndView uscm102Main(HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		ModelAndView returnPage = new ModelAndView("USCM102/uscm102Main");		
		return returnPage;
	}

		
	public ModelAndView findMemberList(HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		if (logger.isDebugEnabled()){ logger.debug("Entering " + getClass() + "." + "ajax_path_normal()"); }
		
		List objList = uscm102Service.findMemberList();
		
		ModelAndView returnPage = new ModelAndView("JSON", "JSON_DATA", objList);	
		returnPage.addObject("objList", objList);
		
		return returnPage;
	}	
	
}
